package com.iflytek.jcy.supervise.clue.web.vo;

import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 
 * <br>
 * 标题:uap权限 <br>
 * 描述: <br>
 * 公司: www.iflytek.com<br>
 * @autho dgyu
 * @time 2022年12月4日 下午4:48:59
 */
public class UapMenu implements Comparable<UapMenu>, Serializable {
    /**  */
	private static final long serialVersionUID = -2384328996745849330L;
	@ApiModelProperty(value = "功能权限ID", example = "0a66d139-4162-4193-b64e-e72ef20770a7")
    private String id;
    @ApiModelProperty(value = "权限名称", example = "数据权限")
    private String name;
    @ApiModelProperty(hidden = true)
    private String code;
    @ApiModelProperty(value = "权限状态", example = "1")
    private Integer status = 1;
    @ApiModelProperty("权限类型(0:MENU,1:URL,2:AUTH)")
    private Integer type;
    @ApiModelProperty(value = "父级权限id", example = "0a66d139-4162-4193-b64e-e72ef20770a7")
    private String parentId;
    @ApiModelProperty(value = "权限层级", hidden = true)
    private Integer level;
    @ApiModelProperty(value = "所属应用id", example = "0a66d139-4162-4193-b64e-e72ef20770a7")
    private String appId;
    @ApiModelProperty(value = "所属应用名称", example = "统一认证平台")
    private String appName;
    @ApiModelProperty(value = "维度id", example = "0a66d139-4162-4193-b64e-e72ef20770a7")
    private String dimId;
    @ApiModelProperty(value = "维度名称", hidden = true)
    private String dimName;
    @ApiModelProperty("地址类型(0：相对上下文,1：相对域名,2：绝对路径)")
    private Integer urlType;
    @ApiModelProperty(value = "权限地址", example = "/user.do")
    private String url;
    @ApiModelProperty("排序")
    private Integer sort;
    @ApiModelProperty(value = "备注", example = "备注,不能大于500字符")
    private String remark;
    @ApiModelProperty(hidden = true)
    private Date createTime;
    @ApiModelProperty(hidden = true)
    private Date updateTime;
    @ApiModelProperty("图标")
    private String ico;

    private List<UapMenu> childs;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public String getDimId() {
        return dimId;
    }

    public void setDimId(String dimId) {
        this.dimId = dimId;
    }

    public String getDimName() {
        return dimName;
    }

    public void setDimName(String dimName) {
        this.dimName = dimName;
    }

    public Integer getUrlType() {
        return urlType;
    }

    public void setUrlType(Integer urlType) {
        this.urlType = urlType;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getIco() {
        return ico;
    }

    public void setIco(String ico) {
        this.ico = ico;
    }

    public List<UapMenu> getChilds() {
        return childs;
    }

    public void setChilds(List<UapMenu> childs) {
        this.childs = childs;
    }

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }

    @Override
    public int compareTo(UapMenu menu) {
        int otherId = null == menu.getSort() ? 999 : menu.getSort();
        if (null == this.sort) {
            sort = 0;
        }
        return this.sort.compareTo(otherId);
    }
}


